<?php
use yii\helpers\Url;
\backend\assets\CropperAsset::register($this);
?>
<?php $this->beginBlock('content') ?>
<div class="row" style="padding-bottom: 10px;">
    <!-- .Your image -->
    <div class="col-md-9" style="padding: 15px 0 15px 20px;">
        <div class="img-container"><img id="image" src="" class="img-responsive" ></div>
    </div>
    <!-- /.Your image -->
    <!-- .Croping image -->
    <div class="col-md-3" style="padding: 15px 10px 15px 10px;">
        <div class="docs-preview clearfix">
            <div class="img-preview preview-lg"></div>
            <div class="img-preview preview-md"></div>
            <div class="img-preview preview-sm"></div>
            <div class="img-preview preview-xs"></div>
        </div>
        <!-- .pixels of image -->
    </div>
    <!-- /.Croping of image -->
    <div class="col-md-12" style="text-align: center;">
        <div class="btn-group">
            <label class="btn btn-block btn-danger btn-upload" for="inputImage" title="Upload image file" style="margin-bottom: 0">
                <input type="file" class="sr-only" id="inputImage" name="file" accept="image/*">
                <span class="docs-tooltip" data-toggle="tooltip"><span class="fa fa-upload">选择图片</span></span>
            </label>
        </div>
        <div class="btn-group" style="margin-left: 100px;">
            <button class="btn btn-block btn-success" id="saveImage" data-method="getCroppedCanvas" rel-href="<?=Url::to([Yii::$app->request->get('to','upload-local')])?>" rel-name="image">
                <span class="docs-tooltip" data-toggle="tooltip"><span class="fa fa-save">确定保存</span></span>
            </button>
        </div>
    </div>
</div>
<input type="hidden" id="callback_input" value="<?=$callback_input?>">
<input type="hidden" id="callback_view" value="<?=$callback_view?>">
<input type="hidden" id="callbackSuccess" value="<?=$callbackSuccess?>">
<input type="hidden" id="filename" value="<?=$filename??''?>">
<input type="hidden" id="upload_dir" value="<?=$upload_dir?>">
<input type="hidden" id="dataRatio" value="<?=isset($_GET['ratio'])?$_GET['ratio']:1?>">
<input type="hidden" id="dataWidth" value="<?=!empty($_GET['width'])?$_GET['width']:0?>">
<input type="hidden" id="is_records" value="<?=isset($_GET['is_records'])?$_GET['is_records']:0?>">
<input type="hidden" id="records_ways" value="<?=isset($_GET['records_ways'])?$_GET['records_ways']:""?>">
<!--div class="modal docs-cropped" id="getCroppedCanvasModal" aria-hidden="true" aria-labelledby="getCroppedCanvasTitle" role="dialog" tabindex="-1">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                <h4 class="modal-title" id="getCroppedCanvasTitle">Cropped</h4>
            </div>
            <div class="modal-body"></div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
                <a class="btn btn-primary" id="download" href="javascript:void(0);" download="cropped.jpg">Download</a>
            </div>
        </div>
    </div>
</div-->
<?php $this->endBlock(); ?>
